function * func (x) {
  let y = yield (x + 1)
  console.log(y)
  yield y + 1 
}

const f = func(1)
const r1 = f.next()
console.log(r1)
// const r2 = f.next(100)
// console.log(r2)
